(function ($) {
	
	$('.award-discribe-link').click(function () {
		
		$.XYTipsWindow({
			___title:"奖品使用说明",
			___content:"id:awardDiscribeBox",
			___showbg:true,
			___drag:"___boxTitle",
			___width:"400px",
			___height:"300px",
			___boxWrapBdColor:"#666",
			___boxBdColor:"#a5a5a5",
			___fnClose:function(){
				//关闭窗口后执行的函数
			}
		});
		
	});
	
	//截取奖品名称字符个数(16个)
	$('.my-qiangba .img-name').each(function() {
		$(this).text(getStrWithLength($(this).text(), 18));
	});
	
	//检查字符数目
	function getStrWithLength(str, num) {
		var count = 0,
			resStr = '',
			tempChar;
		
		for (var i = 0; i < str.length; i++) {
			tempChar = str.charAt(i);
			if (/^[\u0391-\uFFE5]+$/.test(tempChar)) {
				count += 2;
				if (count > num) {
					return resStr;
				}
			} else {
				count++;
			}
			resStr += tempChar;
		}
		return resStr;
	}
	
})(jQuery);